home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 1.0 for Developers / QuickTime 1.0 for Developers.iso / Goodies / DiVA VideoShop™ / Visual Catalog / Visual Catalog / stack_-1.xml < prev    next >
Extensible Markup Language  |  1991-09-06  |  13KB  |  49 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>27</cardCount>
  7.     <cardID>2540</cardID>
  8.     <listID>8343</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>320</width>
  14.         <height>240</height>
  15.     </cardSize>
  16.     <script>-- global variables:----------------------- screenSet: has the screen been updated yet (to proper size)?-- bigWindow: what size window am I at now?-- browse: am I looking at a browse list?-- findString: current search string-- nxt: special purpose, used to mask cd 6----------------------------------------------------------------- window resizing routines/gon sizeScreenglobal bigWindowget the rect of the cd windowif (item 4 of it) - (item 2 of it) = 240 thenput true into bigWindowelseput false into bigWindowend ifend sizeScreenon resizeWindowglobal bigWindow,bigIndexFldlock screenget the rect of the cd windowif (item 4 of it) - (item 2 of it) = 240 thenput (item 2 of it) + 125 into item 4 of itput false into bigWindow-- send mouseUp to bg button "toggle"elseput (item 2 of it) + 240 into item 4 of itput true into bigWindowend ifset the rect of the cd window to itsetScreenunlock screenend resizeWindowon setScreenglobal bigWindowif bigWindow is true thenif short name of this card is "Main" thenset the rect of bg fld "Segment Index" to 51,41,301,227set the rect of bg fld "browse list" to 51,41,301,227show bg button "block"set the loc of button "toggle" to 45,220set the loc of fld "field name" to 245,226end ifif short name of this card is "Control" thenif the icon of bg button "number" is not 128 thensend mouseUp to bg button "number"end ifhide bg button "number"show fld "cat 1"show fld "cat 1 menu"show fld "cat 2"show fld "cat 2 menu"set the loc of fld "cat 1" to "120,141"set the rect of fld "cat 1 menu" to "65,149,179,211"set the loc of fld "cat 2" to "237,141"set the rect of fld "cat 2 menu" to "183,149,296,211"end ifif short name of this bg is "segment info" thenif the visible of fld "description" is true and¬¨the visible of fld "key words" is true thenexit setScreenend ifset the rect of fld "description" to "51,53,207,227"set the rect of fld "key words" to "51,53,207,227"set the loc of bg button "key state" to "44,205"set the loc of bg button "howdy" to "45,220"set the loc of fld "field name" to 155,225show bg button "block"show bg button "block 2"show fld "created titled"show fld "Created"if the icon of bg button "key state" is 143 thensend modifyWrite to bg button "key state"end ifend ifelseif short name of this bg is "segment info" thenset the loc of bg button "key state" to "44,86"set the loc of bg button "howdy" to "45,101"set the rect of fld "description" to "51,53,207,108"set the rect of fld "key words" to "51,53,207,108"set the loc of fld "field name" to 155,107hide fld "created titled"hide fld "Created"hide bg button "arrow 2"hide bg button "block"hide bg button "block 2"if icon of bg button "howdy" is not  128 thenhide fld "description"elsehide fld "key words"hide bg button "key state"end ifif the icon of bg button "key state" is 143 thensend mouseUp to bg button "key state"end ifend ifif short name of this card is "Main" thenset the rect of bg fld "Segment Index" to 51,41,301,114set the rect of bg fld "browse list" to 51,41,301,114hide bg button "block"set the loc of button "toggle" to "45,107"set the loc of fld "field name" to 245,112end ifif short name of this card is "Control" thenshow bg button "number"hide fld "cat 1"hide fld "cat 1 menu"hide fld "cat 2"hide fld "cat 2 menu"set the loc of fld "cat 1" to "120,51"set the rect of fld "cat 1 menu" to "65,59,179,110"set the loc of fld "cat 2" to "237,51"set the rect of fld "cat 2 menu" to "183,59,296,110"end ifend ifend setScreen-- init and cleanup/g/jon openStackglobal bigWindow,screenSetget the rect of the cd windowif (item 4 of it) - (item 2 of it) = 240 thenput true into bigWindowelseput false into bigWindowend ifput false into screenSetend openStackon closeStackif the freesize of this stack > (.2 * the size of this stack) thendomenu "Compact Stack"end ifend closeStackon searcherglobal checkboxes,searchStringif checkboxes = empty thenput "True,True,True,True" into checkboxesend ifShowDialog 2,23733,"Find:","Search these fields:",¬¨searchString,checkboxesif the result is empty then-- the Cancel button was clickedelseput the result into resultHolderif line 2 of resultHolder is empty then exit searcherput line 1 of resultHolder into checkboxesput line 2 of resultHolder into searchStringlock screenput the short name of this bg into thisBggo bg "Segment info"if item 1 of line 1 of resultHolder = "False" thenset the dontsearch of bg field "Name" to trueelseset the dontsearch of bg field "Name" to falseend if--if item 2 of line 1 of resultHolder = "False" then--  set the dontsearch of bg field "Tape name" to true--else--  set the dontsearch of bg field "Tape name" to false--end ifif item 3 of line 1 of resultHolder = "False" thenset the dontsearch of bg field "Key words" to trueelseset the dontsearch of bg field "Key words" to falseend ifif item 4 of line 1 of resultHolder = "False" thenset the dontsearch of bg field "Description" to trueelseset the dontsearch of bg field "Description" to falseend iffind searchStringif the result = "not found" thengo bg thisBganswer quote & searchString & Quote && "was not found." with "OK"end ifend ifend searcher-- new card handler/gon makeCard cardName,path,type,duration,creation,modiflock screenlock messagesgo last cddomenu "New Card"-- init cardput short id of this card into cdIDput cardName into fld "Name"put "<Description>" into fld "Description"put "<¬©>" into fld "Copyright"put type into fld "type"put creation into creation2convert creation to short dateconvert modif to short dateput duration into fld "duration"put creation into fld "created"put modif into fld "modified"put "<" & fld "category 1 name" & ">" into fld "category 1"put "<" & fld "category 2 name" & ">" into fld "category 2"put path into fld "miconList"-- add to index cdgo cd "Main"put fld "segment index" into segIndexput fld "segment date" into segDaterepeat with counter=1 to number of lines of segIndexput line counter of segIndex && "/" & line counter of segDate into line counter of segIndexend repeatput place2(cardName && "/" &creation2&","& cdID,segIndex) into segIndexput empty into segDaterepeat with counter=1 to number of lines of segIndexput offset("/",line counter of segIndex) into firstput number of chars of line counter of segIndex into lastput (char value(first)+1 to value(last) of line counter of segIndex) & return after segDatedelete char first-1 to last of line counter of segIndexend repeatput segIndex into fld "segment index"put segdate into fld "segment date"unlock messagesunlock screenend makeCard--------------------------------------------------------------------- function takes an ordered, return-delimited list and a word and-- returns an ordered, return-delimited list with the word in it;-- function does not insert redundant insertion requests;-- function uses a recursive, binary insertion algorithm/gfunction place word,listif list is empty then return (word & return)put number of lines of list into numListif numList is 1 thenif word>(line 1 of list) thenput word & return after listreturn listelse if word<(line 1 of list) thenput word & return before listreturn listelsereturn listend ifend ifif word=(line trunc(numList/2) of list) thenreturn listelse if word>(line trunc(numList/2) of list) thenreturn first(list) & place(word,second(list))elsereturn place(word,first(list)) & second(list)end ifend place-- place w/o redundancy checkfunction place2 word,listif list is empty then return (word & return)put number of lines of list into numListif numList is 1 thenif word>(line 1 of list) thenput word & return after listreturn listelseput word & return before listreturn listend ifend ifif word>(line trunc(numList/2) of list) thenreturn first(list) & place2(word,second(list))elsereturn place2(word,first(list)) & second(list)end ifend place2function isort listput empty into sortedListrepeat with counter=1 to number of lines of listput place(line counter of list,sortedList) into sortedListend repeatreturn sortedListend isort-- returns the first half of a listfunction first listif number of lines of list <2 then return emptyput number of lines of list into numListput empty into newListrepeat with counter=1 to trunc(numList/2)put line counter of list & return after newListend repeatreturn newListend first-- returns the second half of a listfunction second listif number of lines of list is 0 then return emptyput number of lines of list into numListput empty into newListrepeat with counter=trunc(numList/2)+1 to numListput line counter of list & return after newListend repeatreturn newListend second-- translate return-delimited list to comma-delimited listfunction translateRC rlistput empty into clistput line 1 of rlist into clistrepeat with counter=2 to number of lines of rlistput "," & line counter of rlist after clistend repeatreturn clistend translateRC-- translate comma-delimited list into return-delimited listfunction translateCR clistput empty into rlistif number of items of clist is 1 thenreturn item 1 of clist & returnelseput item 1 of clist into rlistend ifrepeat with counter=2 to number of items of clistput return & item counter of clist after rlistend repeatreturn rlistend translateCR----------------------------------------------------------------------- miscellaneous-- select the whole line of a field (from APPLE HYPERCARD HELP stack)/gron selectWholeLine lineNumber, theField-- This handler selects a whole line of text, including the final-- return character, in the field. Requires a complete field record-- as in ‚Äúthe target‚Äù or ‚Äúthe name of,‚Äù not just the field name.put line lineNumber of the value of theField into theTextif theText is not empty thenput (number of chars of line 1 to lineNumber of ¬¨the value of theField) + 1 into endChardo "select char (endChar - length(theText)) to endChar of" ¬¨&& theFieldend ifend selectWholeLine</script>
  17.     <background id="2259" file="background_2259.xml" name="Segment Index" />
  18.     <background id="2807" file="background_2807.xml" name="Segment Info" />
  19.     <background id="4820" file="background_4820.xml" name="" />
  20.     <background id="6138" file="background_6138.xml" name="general" />
  21.     <card id="2540" file="card_2540.xml" marked="false" name="main" owner="2259" />
  22.     <card id="5445" file="card_5445.xml" marked="false" name="control" owner="4820" />
  23.     <card id="6184" file="card_6184.xml" marked="false" name="General Help" owner="6138" />
  24.     <card id="7688" file="card_7688.xml" marked="false" name="print" owner="6138" />
  25.     <card id="8756" file="card_8756.xml" marked="false" name="Find" owner="6138" />
  26.     <card id="3033" file="card_3033.xml" marked="false" name="bypass" owner="2807" />
  27.     <card id="4359" file="card_4359.xml" marked="false" name="" owner="2807" />
  28.     <card id="6755" file="card_6755.xml" marked="false" name="" owner="2807" />
  29.     <card id="7544" file="card_7544.xml" marked="false" name="" owner="2807" />
  30.     <card id="9109" file="card_9109.xml" marked="false" name="" owner="2807" />
  31.     <card id="9675" file="card_9675.xml" marked="false" name="" owner="2807" />
  32.     <card id="9760" file="card_9760.xml" marked="false" name="" owner="2807" />
  33.     <card id="10030" file="card_10030.xml" marked="false" name="" owner="2807" />
  34.     <card id="10448" file="card_10448.xml" marked="false" name="" owner="2807" />
  35.     <card id="10726" file="card_10726.xml" marked="false" name="" owner="2807" />
  36.     <card id="10753" file="card_10753.xml" marked="false" name="" owner="2807" />
  37.     <card id="11035" file="card_11035.xml" marked="false" name="" owner="2807" />
  38.     <card id="11391" file="card_11391.xml" marked="false" name="" owner="2807" />
  39.     <card id="11772" file="card_11772.xml" marked="false" name="" owner="2807" />
  40.     <card id="11807" file="card_11807.xml" marked="false" name="" owner="2807" />
  41.     <card id="12047" file="card_12047.xml" marked="false" name="" owner="2807" />
  42.     <card id="12538" file="card_12538.xml" marked="false" name="" owner="2807" />
  43.     <card id="12661" file="card_12661.xml" marked="false" name="" owner="2807" />
  44.     <card id="12994" file="card_12994.xml" marked="false" name="" owner="2807" />
  45.     <card id="13223" file="card_13223.xml" marked="false" name="" owner="2807" />
  46.     <card id="13483" file="card_13483.xml" marked="false" name="" owner="2807" />
  47.     <card id="13626" file="card_13626.xml" marked="false" name="" owner="2807" />
  48. </stack>
  49.